//
//  main.m
//  oc x
//
//  Created by Mac OS on 16-4-5.
//  Copyright (c) 2016年 oyzh. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Atom.h"
#import "Person.h"
#import "Mouse.h"


int main(int argc, const char * argv[])
{

    @autoreleasepool {
        
        // insert code here...
        NSLog(@"Hello, World!");
        //Atom * atom=[[Atom alloc] init];
        //NSLog(@"Atom chemical elment name:%@",atom.chemicalElement);
        Person *p=[[Person alloc]init];
        p.name=@"你是";
        
        Mouse *m=[[Mouse  alloc]init];
        m.name=@"米老鼠";
        
        
        NSArray *arr=@[p, m];
        for(int i = 0; i < arr.count;i++)
            
        {
            Animai * ani=arr[i];
            [ani eat];
            [ani sleep];
        
        
        }
        
        [m makeRole];
        /*Animai * ani=p;
        [ani eat];
        [ani sleep];

        [p eat];
        [p sleep];
        [p talk:@"我饿了"];*/
    }
    return 0;
}

